<<!DOCTYPE html>
<html>
<head>
	<title>JsonDemo</title>
</head>
<body>
<script type="text/javascript">
	var book = {
		title: "Professional JavaScript",
		authors: [
			"Nicholas C. Zakas","Geguo"
		],
		edition: 3,
		year: 2011,
		toJson:function(){
			return this.title;
		}
		};
var jsonText  = JSON.stringify(book);

document.writeln(jsonText);
</script>

</body>
</html>